# shaded torus ("doughnut")

eye { 0.0, 0.0, 4.0 }
light { 0.0, 0.0, 4.0 }

object torus {
  center { 0.0, 0.0, -3.0 }
  rotate { 3, 0, 2 }
  surface if_0_45 {
    style shaded blue
    vertex { 0.53, 0.53, 0.2 }
    vertex { 0.354, 0.354, 0.1 }
    vertex { 0.5, 0.0, 0.1 }
    vertex { 0.75, 0.0, 0.2 }
  }
  surface of_0_45 {
    style shaded blue
    vertex { 0.707, 0.707, 0.1 }
    vertex { 0.53, 0.53, 0.2 }
    vertex { 0.75, 0.0, 0.2 }
    vertex { 1.0, 0.0, 0.1 }
  }
  surface if_45_90 {
    style shaded blue
    vertex { 0.0, 0.75, 0.2 }
    vertex { 0.0, 0.5, 0.1 }
    vertex { 0.354, 0.354, 0.1 }
    vertex { 0.53, 0.53, 0.2 }
  }
  surface of_45_90 {
    style shaded blue
    vertex { 0.0, 1.0, 0.1 }
    vertex { 0.0, 0.75, 0.2 }
    vertex { 0.53, 0.53, 0.2 }
    vertex { 0.707, 0.707, 0.1 }
  }
  surface if_90_135 {
    style shaded blue
    vertex { -0.53, 0.53, 0.2 }
    vertex { -0.354, 0.354, 0.1 }
    vertex { 0.0, 0.5, 0.1 }
    vertex { 0.0, 0.75, 0.2 }
  }
  surface of_90_135 {
    style shaded blue
    vertex { -0.707, 0.707, 0.1 }
    vertex { -0.53, 0.53, 0.2 }
    vertex { 0.0, 0.75, 0.2 }
    vertex { 0.0, 1.0, 0.1 }
  }
  surface if_135_180 {
    style shaded blue
    vertex { -0.75, 0.0, 0.2 }
    vertex { -0.5, 0.0, 0.1 }
    vertex { -0.354, 0.354, 0.1 }
    vertex { -0.53, 0.53, 0.2 }
  }
  surface of_135_180 {
    style shaded blue
    vertex { -1.0, 0.0, 0.1 }
    vertex { -0.75, 0.0, 0.2 }
    vertex { -0.53, 0.53, 0.2 }
    vertex { -0.707, 0.707, 0.1 }
  }
  surface if_180_225 {
    style shaded blue
    vertex { -0.53, -0.53, 0.2 }
    vertex { -0.354, -0.354, 0.1 }
    vertex { -0.5, 0.0, 0.1 }
    vertex { -0.75, 0.0, 0.2 }
  }
  surface of_180_225 {
    style shaded blue
    vertex { -0.707, -0.707, 0.1 }
    vertex { -0.53, -0.53, 0.2 }
    vertex { -0.75, 0.0, 0.2 }
    vertex { -1.0, 0.0, 0.1 }
  }
  surface if_225_270 {
    style shaded blue
    vertex { 0.0, -0.75, 0.2 }
    vertex { 0.0, -0.5, 0.1 }
    vertex { -0.354, -0.354, 0.1 }
    vertex { -0.53, -0.53, 0.2 }
  }
  surface of_225_270 {
    style shaded blue
    vertex { 0.0, -1.0, 0.1 }
    vertex { 0.0, -0.75, 0.2 }
    vertex { -0.53, -0.53, 0.2 }
    vertex { -0.707, -0.707, 0.1 }
  }
  surface if_270_315 {
    style shaded blue
    vertex { 0.53, -0.53, 0.2 }
    vertex { 0.354, -0.354, 0.1 }
    vertex { 0.0, -0.5, 0.1 }
    vertex { 0.0, -0.75, 0.2 }
  }
  surface of_270_315 {
    style shaded blue
    vertex { 0.707, -0.707, 0.1 }
    vertex { 0.53, -0.53, 0.2 }
    vertex { 0.0, -0.75, 0.2 }
    vertex { 0.0, -1.0, 0.1 }
  }
  surface if_315_0 {
    style shaded blue
    vertex { 0.75, 0.0, 0.2 }
    vertex { 0.5, 0.0, 0.1 }
    vertex { 0.354, -0.354, 0.1 }
    vertex { 0.53, -0.53, 0.2 }
  }
  surface of_315_0 {
    style shaded blue
    vertex { 1.0, 0.0, 0.1 }
    vertex { 0.75, 0.0, 0.2 }
    vertex { 0.53, -0.53, 0.2 }
    vertex { 0.707, -0.707, 0.1 }
  }
  surface i_0_45 {
    style shaded red
    vertex { 0.354, 0.354, 0.1 }
    vertex { 0.354, 0.354, -0.1 }
    vertex { 0.5, 0.0, -0.1 }
    vertex { 0.5, 0.0, 0.1 }
  }
  surface o_0_45 {
    style shaded red
    vertex { 0.707, 0.707, -0.1 }
    vertex { 0.707, 0.707, 0.1 }
    vertex { 1.0, 0.0, 0.1 }
    vertex { 1.0, 0.0, -0.1 }
  }
  surface i_45_90 {
    style shaded red
    vertex { 0.0, 0.5, 0.1 }
    vertex { 0.0, 0.5, -0.1 }
    vertex { 0.354, 0.354, -0.1 }
    vertex { 0.354, 0.354, 0.1 }
  }
  surface o_45_90 {
    style shaded red
    vertex { 0.0, 1.0, -0.1 }
    vertex { 0.0, 1.0, 0.1 }
    vertex { 0.707, 0.707, 0.1 }
    vertex { 0.707, 0.707, -0.1 }
  }
  surface i_90_135 {
    style shaded red
    vertex { -0.354, 0.354, 0.1 }
    vertex { -0.354, 0.354, -0.1 }
    vertex { 0.0, 0.5, -0.1 }
    vertex { 0.0, 0.5, 0.1 }
  }
  surface o_90_135 {
    style shaded red
    vertex { -0.707, 0.707, -0.1 }
    vertex { -0.707, 0.707, 0.1 }
    vertex { 0.0, 1.0, 0.1 }
    vertex { 0.0, 1.0, -0.1 }
  }
  surface i_135_180 {
    style shaded red
    vertex { -0.5, 0.0, 0.1 }
    vertex { -0.5, 0.0, -0.1 }
    vertex { -0.354, 0.354, -0.1 }
    vertex { -0.354, 0.354, 0.1 }
  }
  surface o_135_180 {
    style shaded red
    vertex { -1.0, 0.0, -0.1 }
    vertex { -1.0, 0.0, 0.1 }
    vertex { -0.707, 0.707, 0.1 }
    vertex { -0.707, 0.707, -0.1 }
  }
  surface i_180_225 {
    style shaded red
    vertex { -0.354, -0.354, 0.1 }
    vertex { -0.354, -0.354, -0.1 }
    vertex { -0.5, 0.0, -0.1 }
    vertex { -0.5, 0.0, 0.1 }
  }
  surface o_180_225 {
    style shaded red
    vertex { -0.707, -0.707, -0.1 }
    vertex { -0.707, -0.707, 0.1 }
    vertex { -1.0, 0.0, 0.1 }
    vertex { -1.0, 0.0, -0.1 }
  }
  surface i_225_270 {
    style shaded red
    vertex { 0.0, -0.5, 0.1 }
    vertex { 0.0, -0.5, -0.1 }
    vertex { -0.354, -0.354, -0.1 }
    vertex { -0.354, -0.354, 0.1 }
  }
  surface o_225_270 {
    style shaded red
    vertex { 0.0, -1.0, -0.1 }
    vertex { 0.0, -1.0, 0.1 }
    vertex { -0.707, -0.707, 0.1 }
    vertex { -0.707, -0.707, -0.1 }
  }
  surface i_270_315 {
    style shaded red
    vertex { 0.0, -0.5, -0.1 }
    vertex { 0.0, -0.5, 0.1 }
    vertex { 0.354, -0.354, 0.1 }
    vertex { 0.354, -0.354, -0.1 }
  }
  surface o_270_315 {
    style shaded red
    vertex { 0.0, -1.0, 0.1 }
    vertex { 0.0, -1.0, -0.1 }
    vertex { 0.707, -0.707, -0.1 }
    vertex { 0.707, -0.707, 0.1 }
  }
  surface i_315_0 {
    style shaded red
    vertex { 0.5, 0.0, 0.1 }
    vertex { 0.5, 0.0, -0.1 }
    vertex { 0.354, -0.354, -0.1 }
    vertex { 0.354, -0.354, 0.1 }
  }
  surface o_315_0 {
    style shaded red
    vertex { 1.0, 0.0, -0.1 }
    vertex { 1.0, 0.0, 0.1 }
    vertex { 0.707, -0.707, 0.1 }
    vertex { 0.707, -0.707, -0.1 }
  }
  surface ib_0_45 {
    style shaded blue
    vertex { 0.75, 0.0, -0.2 }
    vertex { 0.5, 0.0, -0.1 }
    vertex { 0.354, 0.354, -0.1 }
    vertex { 0.53, 0.53, -0.2 }
  }
  surface ob_0_45 {
    style shaded blue
    vertex { 1.0, 0.0, -0.1 }
    vertex { 0.75, 0.0, -0.2 }
    vertex { 0.53, 0.53, -0.2 }
    vertex { 0.707, 0.707, -0.1 }
  }
  surface ib_45_90 {
    style shaded blue
    vertex { 0.53, 0.53, -0.2 }
    vertex { 0.354, 0.354, -0.1 }
    vertex { 0.0, 0.5, -0.1 }
    vertex { 0.0, 0.75, -0.2 }
  }
  surface ob_45_90 {
    style shaded blue
    vertex { 0.707, 0.707, -0.1 }
    vertex { 0.53, 0.53, -0.2 }
    vertex { 0.0, 0.75, -0.2 }
    vertex { 0.0, 1.0, -0.1 }
  }
  surface ib_90_135 {
    style shaded blue
    vertex { 0.0, 0.75, -0.2 }
    vertex { 0.0, 0.5, -0.1 }
    vertex { -0.354, 0.354, -0.1 }
    vertex { -0.53, 0.53, -0.2 }
  }
  surface ob_90_135 {
    style shaded blue
    vertex { 0.0, 1.0, -0.1 }
    vertex { 0.0, 0.75, -0.2 }
    vertex { -0.53, 0.53, -0.2 }
    vertex { -0.707, 0.707, -0.1 }
  }
  surface ib_135_180 {
    style shaded blue
    vertex { -0.53, 0.53, -0.2 }
    vertex { -0.354, 0.354, -0.1 }
    vertex { -0.5, 0.0, -0.1 }
    vertex { -0.75, 0.0, -0.2 }
  }
  surface ob_135_180 {
    style shaded blue
    vertex { -0.707, 0.707, -0.1 }
    vertex { -0.53, 0.53, -0.2 }
    vertex { -0.75, 0.0, -0.2 }
    vertex { -1.0, 0.0, -0.1 }
  }
  surface ib_180_225 {
    style shaded blue
    vertex { -0.75, 0.0, -0.2 }
    vertex { -0.5, 0.0, -0.1 }
    vertex { -0.354, -0.354, -0.1 }
    vertex { -0.53, -0.53, -0.2 }
  }
  surface ob_180_225 {
    style shaded blue
    vertex { -1.0, 0.0, -0.1 }
    vertex { -0.75, 0.0, -0.2 }
    vertex { -0.53, -0.53, -0.2 }
    vertex { -0.707, -0.707, -0.1 }
  }
  surface ib_225_270 {
    style shaded blue
    vertex { -0.53, -0.53, -0.2 }
    vertex { -0.354, -0.354, -0.1 }
    vertex { 0.0, -0.5, -0.1 }
    vertex { 0.0, -0.75, -0.2 }
  }
  surface ob_225_270 {
    style shaded blue
    vertex { -0.707, -0.707, -0.1 }
    vertex { -0.53, -0.53, -0.2 }
    vertex { 0.0, -0.75, -0.2 }
    vertex { 0.0, -1.0, -0.1 }
  }
  surface ib_270_315 {
    style shaded blue
    vertex { 0.0, -0.75, -0.2 }
    vertex { 0.0, -0.5, -0.1 }
    vertex { 0.354, -0.354, -0.1 }
    vertex { 0.53, -0.53, -0.2 }
  }
  surface ob_270_315 {
    style shaded blue
    vertex { 0.0, -1.0, -0.1 }
    vertex { 0.0, -0.75, -0.2 }
    vertex { 0.53, -0.53, -0.2 }
    vertex { 0.707, -0.707, -0.1 }
  }
  surface ib_315_0 {
    style shaded blue
    vertex { 0.53, -0.53, -0.2 }
    vertex { 0.354, -0.354, -0.1 }
    vertex { 0.5, 0.0, -0.1 }
    vertex { 0.75, 0.0, -0.2 }
  }
  surface ob_315_0 {
    style shaded blue
    vertex { 0.707, -0.707, -0.1 }
    vertex { 0.53, -0.53, -0.2 }
    vertex { 0.75, 0.0, -0.2 }
    vertex { 1.0, 0.0, -0.1 }
  }
}

